<?php
namespace App\Services\Agent;

use App\Services\Agent\Agent\AgentLogic;

class Agent
{
    // 添加代理
    public function addAgent($data)
    {
        ValidateAgent::checkValidate($data, ['agent_type', 'full_name', 'simple_name', 'phone_name', 'card_type', 'card', 'phone','email','scale','protocol_file','record_file','main','country','payee_name','band_card','band_info']);
        return (new AgentLogic())->addAgent($data);
    }

    //代理列表
    public function agentList($data){
        return (new AgentLogic())->agentList($data);
    }

    //获取代理列表（不分页）
    public function agentListNoPage($data)
    {
        return (new AgentLogic())->agentListNoPage($data);
    }

    //代理详情
    public function agentDetail($data){
        return (new AgentLogic())->agentDetail($data);
    }

    //修改代理
    public function updateAgent($data){
        return (new AgentLogic())->updateAgent($data);
    }

    //根据agent_id查看用户信息
    public function userByAgentId($data){
        return (new AgentLogic())->userByAgentId($data);
    }

    //处理违约
    public function deal($data){
        return (new AgentLogic())->deal($data);
    }

    //注销处理
    public function cancle($data){
        return (new AgentLogic())->cancle($data);
    }

    //更新协议
    public function updateProtocol($data){
        return (new AgentLogic())->updateProtocol($data);
    }

}
